package com.yan.operator.Demo;

import java.util.Scanner;

public class OperatorDemo4 {
    public static void main(String[] args) {
        // 定义两个数
        int num1;
        Scanner input = new Scanner(System.in);
        System.out.println("输入一个数");
        num1 = input.nextInt();
        // 判断
        if (num1 >= 4 && num1 < 6) {
            System.out.println(num1 + "在范围中");
        } else {
            System.out.println(num1 + "不在在范围中");
        }
        // 定义小数变量
        double num2;
        System.out.println("输入一个数");
        num2 = input.nextDouble();
        // 判断
        if (num2 <= 4.0 || num2 > 6.0) {
            System.out.println(num2 + "不在范围中");
        } else {
            System.out.println(num2 + "在在范围中");
        }
    }
}
